calculation of Cn using fourier transform